This specification relates to data processing and indexing.
The Internet provides access to a wide variety of resources such as video or audio files, web pages for particular subjects, book articles, or news articles. A search system can identify resources in response to a text search query that includes one or more search phrases (i.e., one or more words). The search system ranks the resources based on their relevance to the search query and on measures of quality of the resources and provides search results that link to the identified resources. The search results are typically ordered for viewing according to the ranking.
Some search systems can obtain or infer a query location (e.g., a city, state, zip code, or other indicia of locale) that is associated with a search query. A query location that is associated with a search query is a geographic location of the user device from which the search query was received or a geographic location that is specified by and/or inferred from the contents of the search query. For example, a search system can determine that the location of the user device from which the search query was received is the query location that is associated with the search query. Similarly, a search system can parse the contents of the search query to obtain the query location that is associated with the search query. For example, the search system can parse a search query “coffee shop San Francisco,” to identify San Francisco as the query location that is associated with the search query.
Using the query location, search systems can select resources having business locations that are within a threshold distance (e.g., 50 miles) of the query location as being responsive to the search query and provide search results that reference the selected resources. For example, in response to receiving the search query “coffee shop” and determining the location of the user device from which the search query was received, the search system provides search results that reference web pages for coffee shops that are located within a threshold distance (e.g., 50 miles) of the location of the user device. Similarly, in response to receiving the search query “coffee shop San Francisco,” the search system may provide search results that reference web pages for coffee shops that are located within the threshold distance of San Francisco.
Providing search results that reference web pages (or other resources) for businesses (or other entities) that are located within the threshold distance of the query location increases the likelihood that the user is provided search results that satisfy the user's informational need. For example, a user that submits the search query “coffee shop” is more likely to travel to a coffee shop that is within the threshold distance of their current location (or a specified location) than a coffee shop that is outside of the threshold distance. Therefore, many users may be satisfied to receive search results referencing coffee shops that are within the threshold distance of the query location. However, users that submit other search queries, such as the search query “snow skiing,” may be more satisfied if the search results include references to web pages for ski resorts that are beyond the threshold distance from the query location, since users overall may be willing to travel further than the threshold distance to visit a ski resort.